# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Brendan MacDonell <macdonellba at gmail dot com>

pkgname=python-llfuse
pkgver=1.4.2
pkgrel=2
pkgdesc="A set of Python bindings for the low level FUSE API."
arch=('loong64' 'x86_64')
url="https://github.com/python-llfuse/python-llfuse/"
license=('LGPL')
depends=('python' 'fuse2')
makedepends=('python-setuptools' 'cython')
checkdepends=('python-pytest')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/l/llfuse/llfuse-$pkgver.tar.gz")
sha256sums=('ea4d19297be0ddbc5db68b421aa649c737a351f9c809919385a118c217c33083')

prepare() {
  cd "${srcdir}/llfuse-${pkgver}"
}

build() {
  cd "${srcdir}/llfuse-${pkgver}"
  python setup.py build_cython
  python setup.py build_ext --inplace
}

check() {
  cd "${srcdir}/llfuse-${pkgver}"
  # https://github.com/python-llfuse/python-llfuse/issues/35 tests incompatible with pytest>=6
  #python -m pytest test/
}

package() {
  cd "${srcdir}/llfuse-${pkgver}"
  python setup.py install --root="$pkgdir" --optimize=1
}
